<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
	CodeFile="DomeniiAparate.aspx.cs" Inherits="DomeniiAparate" Title="Domenii Aparate" %>

<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register Namespace="NS_Controls" TagPrefix="cc1" %>
<%@ Register Namespace="CustomControlsNS" TagPrefix="cc2" %>
<asp:Content ID="ContentDefault" ContentPlaceHolderID="ContentPlaceHolderContent"
	runat="Server">
	<link href="../../Styles/themes/fancy/tabs.css" rel="stylesheet" type="text/css" />
	<link href="../../Styles/themes/fancy/fancy-blue/fancy-blue.css" rel="stylesheet"
		type="text/css" />

	<asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional">
		<ContentTemplate>
			<div style="padding-bottom: 20px">
				<asp:Literal ID="output" runat="server" />
				<ajaxToolKit:TabContainer ID="topSideTabs" runat="server" CssClass="fancy fancy-blue"
					AutoPostBack="true">
					<ajaxToolKit:TabPanel ID="tabDomains" runat="server" HeaderText="Domenii Paraclinice">
						<ContentTemplate>
<%--
Session("Menu") = "DOMAINS"

	'ValidateSecurity()
	if not checkSecLevel(SEC_LAB_ADMIN) then
		Session("Error") = "Nu aveti suficiente drepturi pentru pagina ceruta."
		Response.Redirect Application("AbsPath") & "/main.asp"
	end if

	'ValidatePage()
	If Session("LOGIN") = "" or Session("Connection") = "" Then
		Session("Error") = "Pagina pe care ati cerut-o nu va este accesibila."
		Response.Redirect Application("AbsPath") & "/default.asp"
	end if

	if not OpenDBConnection() then
		Session("Error") = "Conexiunea la baza de date nu poate fi deschisa.<br>" & Session("Error")
		Response.Redirect Application("AbsPath") & "/noAccess.asp"
	end if

'@ PAGE TITLE
fw_ObjItem.StringName = "title"
fw_ObjItem.StringValue = "HIPOCRATE - Lista domenii"

	<script language="javascript">
		var wndPhoto, wndHelp;

		function OpenHelpWindow()
		{
			wndHelp = window.open('help.htm', '', 'scrollbars=yes, toolbar=no, menubar=no, width=450, height=350');
			wndHelp.focus();
		}

		function window_onunload()
		{
			if(typeof(wndHelp) != "undefined")
				if(!wndHelp.closed)
					wndHelp.close();
		}

	</script>

'@ BODY TAG:
fw_ObjItem.StringName = "str"
fw_ObjItem.StringValue = "onload='return window_onload()' onunload='return window_onunload()' scroll='no'"

--%>
							<div id="ButoaneDomenii">
								<table><tr><td>
									<cc2:CustomButton ID="btnAddDomain" runat="server" Text="Adauga Domeniu" Title="Insert" OnServerClick="btnAddDomain_Click" AccessKey="1" />
								</td><td>
									<asp:UpdateProgress ID="UpdateProgressDomains" runat="server" DisplayAfter="100">
										<ProgressTemplate>
											<span id="spnProgress" class="clsTextBoldYellow">(<% =Resources.GridView.PageLoading %>)</span>
										</ProgressTemplate>
									</asp:UpdateProgress>
								</td></tr></table>
							</div>
							<table width="98%" id="ListaDomenii">
								<tr valign="top">
									<td>
										<br />
										<div class="menu_th">
											<asp:Label ID="lblDomeniiTH" runat="server" CssClass="menu_th">
												Domenii de laborator
											</asp:Label>
										</div>
										<table width="100%">
											<tr>
												<td>
													<table border="0" id="domainsTHead" cellpadding="0" cellspacing="0" width="98%">
														<tr><td>
													<table border="0" width="100%">
														<tr class="tdh">
															<td style="width: 6%">
																&nbsp;
																<asp:Literal ID="thDomainEditText" runat="server" Text="<%$ Resources:GridView, Edit %>" />
																&nbsp;
															</td>
															<td style="width: 42%">&nbsp;Nume&nbsp;</td>
															<td style="width: 20%">&nbsp;Status&nbsp;</td>
															<td style="width: 32%">&nbsp;Vizibilitate&nbsp;</td>
														</tr>
													</table>
														</td><td style="width: 16px">
															&nbsp;
														</td></tr>
													</table>
													<div style="overflow: scroll; max-height: 250px; vertical-align: top; width: 98%" id="domainScroller">
														<asp:Repeater ID="rptDomains" runat="server">
															<HeaderTemplate>
																<table border="0" width="98%" cellpadding="0" cellspacing="2" bgcolor="#e0e0e0">
																	<tbody>
															</HeaderTemplate>
															<ItemTemplate>
																<tr class="tdn">
																	<td style="text-align:center; width: 6%">
																		<asp:LinkButton ID="editDomain" CssClass="redFont" runat="server" OnClick="EditDomain_Click" CommandArgument='<%# Eval("ID") %>'>
																			<asp:Image ImageUrl="~/Images/Edit.gif" AlternateText="<%$ Resources:GridView, Edit %>" runat="server" border="0" />
																			<!-- modifica -->
																		</asp:LinkButton>
																		<%--asp:ImageButton ID="editDomainImg" CssClass="redFont" runat="server" OnClick="EditDomain_Click" CommandArgument='<%# Eval("ID") %>'
																			ImageUrl="~/Images/Edit.gif" AlternateText="<%$ Resources:GridView, Edit %>" /--%>
																	</td>
																	<td style="width: 42%">
																		<%--# Server.HtmlEncode((Container.DataItem is string ? Container.DataItem : DataBinder.Eval(Container.DataItem, "Name")).ToString())--%>
																		&nbsp;<%# Eval("Domain") %>
																	</td>
																	<td style="width: 20%">
																		&nbsp;<%# System.Convert.ToBoolean(Eval("active")) ? "Activ" : "<i style=\"color:Red\">Inactiv</i>"%>
																	</td>
																	<td style="width: 32%">
																		&nbsp;Rezultate
																		<%# System.Convert.ToBoolean(Eval("AlwaysVisible")) ? "<strong>vizibile</strong> si" : "<em>ascunse</em>"%>
																		daca sunt nevalidate
																	</td>
																</tr>
															</ItemTemplate>
															<FooterTemplate>
																	</tbody>
																</table>
															</FooterTemplate>
														</asp:Repeater>
														<asp:PlaceHolder ID="noDomainsYet" runat="server" Visible="false">
															<table width="75%" cellpadding="0" cellspacing="2">
																<tr>
																	<td>
																		<font face="Verdana,Arial,Helvetica" color="#191970" size="-2">
																			Ne pare rau, cautarea dumneavoastra nu are nici un corespondent in baza de date!
																		</font>
																	</td>
																</tr>
																<tr>
																	<td><font face="Verdana,Arial,Helvetica" color="#191970" size="-2">&nbsp;</font></td>
																</tr>
															</table>
														</asp:PlaceHolder>
													</div> <!-- scroller -->
												</td>
											</tr>
										</table>
										<div class="divEnd">
										</div>
										<asp:Literal ID="DomainsCount" runat="server" />
									</td>
								</tr>
							</table>
						</ContentTemplate>
					</ajaxToolKit:TabPanel>
					<ajaxToolKit:TabPanel ID="tabGroups" runat="server" HeaderText="Grupuri Investigatii">
						<ContentTemplate>
							<cc1:ExtendedGridView ID="egvGroups" runat="server" style="width:90%" UseDefaultStyle="false"
								DataKeyNames="id" AutoGenerateEditButton="true" AutoGenerateDeleteButton="true" AutoSave="true"
								OnRowEditing="egvGroups_RowEditing" OnRowCancelingEdit="egvGroups_RowCancelingEdit" OnRowUpdating="egvGroups_RowUpdating" OnRowDeleting="egvGroups_RowDeleting" OnRowInserting="egvGroups_RowInserting"
								ShowEditLink="true" ShowInsertLink="true" EnableInsert="false" EnableExport="false" EnableExportPDF="false"
								EmptyDataText="Ne pare rau, cautarea dumneavoastra nu are nici un corespondent in baza de date!"
								/>
							<asp:Button ID="btnSaveGroups" runat="server" Text="Save ALL" Visible="false" />
							<div class="divEnd">
							</div>
							<asp:Literal ID="GroupsCount" runat="server" />
						</ContentTemplate>
					</ajaxToolKit:TabPanel>
					<ajaxToolKit:TabPanel ID="tabMachines" runat="server" HeaderText="Aparate">
						<ContentTemplate>
							<div id="ButoaneAparate">
								<table><tr><td>
									<cc2:CustomButton ID="btnAddMachine" runat="server" Text="Adauga Aparat" Title="Insert" OnServerClick="btnAddMachine_Click" AccessKey="1" />
								</td><td>
									<asp:UpdateProgress ID="UpdateProgressMachines" runat="server" DisplayAfter="100">
										<ProgressTemplate>
											<span id="spnProgress" class="clsTextBoldYellow">(<% =Resources.GridView.PageLoading %>)</span>
										</ProgressTemplate>
									</asp:UpdateProgress>
								</td></tr></table>
							</div>
							<table width="98%" id="ListaAparate">
								<tr valign="top">
									<td>
										<br />
										<div class="menu_th">
											<asp:Label ID="lblAparateTH" runat="server" CssClass="menu_th">
												Tipuri De Aparate
											</asp:Label>
										</div>
										<table width="100%">
											<tr>
												<td>
													<table border="0" id="machinesTHead" cellpadding="0" cellspacing="0" width="98%">
														<tr><td>
													<table border="0" width="100%">
														<tr class="tdh">
															<td style="width: 6%">
																&nbsp;
																<asp:Literal ID="thMachineEditText" runat="server" Text="<%$ Resources:GridView, Edit %>" />
																&nbsp;
															</td>
															<td style="width: 42%">&nbsp;Cod&nbsp;</td>
															<td style="width: 32%">&nbsp;Clasa Rezultate&nbsp;</td>
															<td style="width: 20%">&nbsp;Furnizor&nbsp;</td>
														</tr>
													</table>
														</td><td style="width: 16px">
															&nbsp;
														</td></tr>
													</table>
													<div style="overflow: scroll; max-height: 250px; vertical-align: top; width: 98%" id="machineScroller">
														<asp:Repeater ID="rptMachines" runat="server">
															<HeaderTemplate>
																<table border="0" width="98%" cellpadding="0" cellspacing="2" bgcolor="#e0e0e0">
																	<tbody>
															</HeaderTemplate>
															<ItemTemplate>
																<tr class="tdn">
																	<td style="text-align:center; width: 6%">
																		<asp:LinkButton ID="editMachine" CssClass="redFont" runat="server" OnClick="EditMachine_Click" CommandArgument='<%# Eval("ID") %>'>
																			<asp:Image ID="Image1" ImageUrl="~/Images/Edit.gif" AlternateText="<%$ Resources:GridView, Edit %>" runat="server" border="0" />
																			<!-- modifica -->
																		</asp:LinkButton>
																	</td>
																	<td style="width: 42%">
																		<%--# Server.HtmlEncode((Container.DataItem is string ? Container.DataItem : DataBinder.Eval(Container.DataItem, "Name")).ToString())--%>
																		&nbsp;<%# Eval("name")%>
																	</td>
																	<td style="width: 32%">
																		&nbsp;<%# Eval("Class")%>
																	</td>
																	<td style="width: 20%">
																		&nbsp;
																		<%# Eval("url").ToString().Trim().Length > 0 ?
																			"<a href=\"" + Eval("url") + "\" target=\"new\">" + Eval("Supplier") + "</a>" :
																			Eval("Supplier") %>
																	</td>
																</tr>
															</ItemTemplate>
															<FooterTemplate>
																	</tbody>
																</table>
															</FooterTemplate>
														</asp:Repeater>
														<asp:PlaceHolder ID="noMachinesYet" runat="server" Visible="false">
															<table width="75%" cellpadding="0" cellspacing="2">
																<tr>
																	<td>
																		<font face="Verdana,Arial,Helvetica" color="#191970" size="-2">
																			Ne pare rau, cautarea dumneavoastra nu are nici un corespondent in baza de date!
																			Ne pare rau, cautarea dumneavoastra nu are nici un corespondent in baza de date!
																		</font>
																	</td>
																</tr>
																<tr>
																	<td><font face="Verdana,Arial,Helvetica" color="#191970" size="-2">&nbsp;</font></td>
																</tr>
															</table>
														</asp:PlaceHolder>
													</div> <!-- scroller -->
												</td>
											</tr>
										</table>
										<div class="divEnd">
										</div>
										<asp:Literal ID="MachinesCount" runat="server" />
									</td>
								</tr>
							</table>
						</ContentTemplate>
					</ajaxToolKit:TabPanel>
				</ajaxToolKit:TabContainer>
				<div id="divLinkHome" style="padding: 10px">
					<asp:Image runat="Server" ID="imgReturnMain" ImageUrl="~/Images/Hipocrate/icon_home.gif"
						AlternateText="Click to return" UseSubmitBehavior="false" Style="cursor: pointer" />
					<asp:HyperLink ID="lnkMainPage" runat="server" Text="Inapoi la pagina principala"
						NavigateUrl="~/Default.aspx" />
				</div>
			</div>
		</ContentTemplate>
	</asp:UpdatePanel>

	<div style="Left: 20%; Right: 20%; Float: none; Position: absolute; Top: 40%; bottom: 40%; visibility: visible; background-color: Transparent">
	<asp:Button ID="btnShowPopup" runat="server" Style="display: none" />
	<ajaxToolKit:ModalPopupExtender ID="mdlPopupDomains" runat="server" TargetControlID="btnShowPopup"
		PopupControlID="pnlDomainPopup" CancelControlID="DomainCancelButton" BackgroundCssClass="modalBackground"
		PopupDragHandleControlID="pnDragHandleSelectionDomain" RepositionMode="None" X="0" Y="0" />
	<div ID="pnlDomainPopup" runat="server" class="modalPopup" Style="display: none" Width="500px">
				<asp:Table runat="server" ID="tblDomainTitleBar" Style="background-color: #87cefa; border: solid 1px Gray; height:28px; width: 500px">
					<asp:TableRow>
						<asp:TableCell Width="100%" HorizontalAlign="Center">
							<asp:Panel runat="server" ID="pnDragHandleSelectionDomain" Style="cursor: move;">
								Domeniu de investigatii
							</asp:Panel>
						</asp:TableCell>
						<asp:TableCell>
							<asp:Image ID="DomainCancelButton" AccessKey="c" runat="server" ImageUrl="~/Images/Hipocrate/icon_post_delete.gif"
								Style="cursor: pointer" title="<%$ Resources:DatabaseStrings, Close %>" />
						</asp:TableCell>
					</asp:TableRow>
				</asp:Table>
		<asp:UpdatePanel ID="upDomainEditor" runat="server" UpdateMode="Always">
			<ContentTemplate>
				<table style="width:500px">
					<tr>
						<td align="right">
							<asp:Label ID="lblDomainTitle" runat="server" Font-Bold="true" ForeColor="Yellow">
								Domeniu de investigatii
							</asp:Label>
						</td>
					</tr>
				</table>
				<table style="width:500px">
					<tr valign="top">
						<td>
							<div class="menu_th">
								<asp:Label ID="lblDomainH2" runat="server" CssClass="menu_th">
									Domeniul de investigatii <!-- info -->
								</asp:Label>
							</div>
							<asp:Literal ID="hiddenDomainId" runat="server" Visible="false" />
							<table width="100%">
								<tr>
									<td class="tdn" style="width:40%">Domeniu:</td>
									<td class="tdn" colspan="3"> <!-- size="35" -->
										<asp:TextBox ID="strDomain" runat="server" CssClass="box" MaxLength="50" style="width: 250px" />
										&nbsp;
									</td>
								</tr>
								<tr>
									<td class="tdn" width="40%">Sectia:</td>
									<td class="tdn" colspan="3">
										<asp:DropDownList ID="strSection" runat="server" CssClass="box" />
									</td>
								</tr>
								<tr>
									<td class="tdn">
										<label for="<% =strActive.ClientID %>">
											Este domeniu Activ?
										</label>
									</td>
									<td class="tdn" style="width:10%">
										<asp:CheckBox ID="strActive" runat="server" CssClass="box" Checked="true" />
										&nbsp;
									</td>
									<td class="tdn" style="width:40%">
										<label for="<% =strAlwaysVisible.ClientID %>">
											Rezultat intotdeauna vizibil?
										</label>
									</td>
									<td class="tdn" style="width:10%">
										<asp:CheckBox ID="strAlwaysVisible" runat="server" CssClass="box" Checked="true" />
										&nbsp;
									</td>
								</tr>
								<tr class="tdn">
									<td>
										<label for="<% =strDisplayAnalysesHeader.ClientID %>">
											<!-- Literal id="lblDisplayAnalysesHeader" run at="server" -->
											Afiseaza capul de tabel pentru analize ?
										</label>
									</td>
									<td colspan="3">
										<asp:CheckBox ID="strDisplayAnalysesHeader" runat="server" CssClass="box" Checked="true" />
										&nbsp;
									</td>
								</tr>
								<tr>
									<td class="tdn" colspan="2">
										Pozitionare pe ecran: <br> <!-- size="2" -->
										La randul : <asp:TextBox ID="strScreenY" runat="server" CssClass="box" MaxLength="5" style="width:28px" onchange="DoSyncCoords()" onkeyup="DoSyncCoords()" onblur="DoSyncCoords()" Text="1" />
										<span id="hiddenXZ1" runat="server" visible="false">
										X : <asp:TextBox ID="strScreenX" runat="server" CssClass="box" MaxLength="5" style="width:28px" Text="1" />
										Z : <asp:TextBox ID="strScreenZ" runat="server" CssClass="box" MaxLength="5" style="width:28px" Text="1" />
										</span>
									</td>
									<td class="tdn" colspan="2">
										La imprimanta:
										<input type="checkbox" id="syncCoords" checked="checked" value="test" onchange="UpdateSyncCoords()" onclick="UpdateSyncCoords()" />
										<label for="syncCoords">Aceeasi pozitie</label>
										<br> <!-- size="2" -->
										La randul : <asp:TextBox ID="strPrintY" runat="server" CssClass="box" MaxLength="5" style="width:28px" Text="1" />
										<span id="hiddenXZ2" runat="server" visible="false">
										X : <asp:TextBox ID="strPrintX" runat="server" CssClass="box" MaxLength="5" style="width:28px" Text="1" />
										Z : <asp:TextBox ID="strPrintZ" runat="server" CssClass="box" MaxLength="5" style="width:28px" Text="1" />
										</span>
									</td>
								</tr>
							</table>
							<div class="divEnd">
							</div>
							<div style="text-align:center">
								<cc2:CustomButton ID="btnSaveDomain" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Save %>"
									OnServerClick="ProcessDomainCommand" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnDeleteDomain" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Delete %>"
									OnServerClick="ProcessDomainCommand" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnInsertDomain" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Add %>"
									OnServerClick="ResetDomainId" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnSearchDomain" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Search %>"
									OnServerClick="BackToDomainList" />
							</div>
						</td>
					</tr>
				</table>
			</ContentTemplate>
		</asp:UpdatePanel>
<%--
Session("Menu") = "DOMAINS"

	'ValidatePage()
	If Session("LOGIN") = "" or Session("Connection") = "" Then
		Session("Error") = "Pagina pe care ati cerut-o nu va este accesibila."
		Response.Redirect Application("AbsPath") & "/default.asp"
	end if

	'ValidateSecurity()
	if not checkSecLevel(SEC_LAB_ADMIN) then
		Session("Error") = "Nu aveti suficiente drepturi pentru pagina ceruta."
		Response.Redirect Application("AbsPath") & "/main.asp"
	end if

	if not OpenDBConnection() then 'same method body as above
		Session("Error") = "Conexiunea la baza de date nu poate fi deschisa.<br>" & Session("Error")
		Response.Redirect Application("AbsPath") & "/noAccess.asp"
	end if

	Call LoadParameters

Sub LoadParameters
	if Request.Form("hdnAction")&"" = "" then
		' list by default
		strAction = "L"
	else
		strAction = Ucase(Request.Form("hdnAction"))
	end if

	if Request.Form("hdnCodeID")&"" = "" then
		intCodeID = Request.QueryString("id")
	else
		intCodeID = Request.Form("hdnCodeID")
	end if
	if intCodeID&"" = "" then
		intCodeID = "0"
		strAction  = "I"
	elseif strAction = "S" OR strAction = "A" then
		strDomain = Request.Form("strDomain")&""
		strSection = Request.Form("strSection")&""
		strActive = Request.Form("strActive")&""
		strAlwaysVisible = Request.Form("strAlwaysVisible")&""
		strDisplayAnalysesHeader = Request.Form("strDisplayAnalysesHeader")&""
		'if Request.Form("strScreenX")&""
		strScreenX = Request.Form("strScreenX")&""
		strScreenY = Request.Form("strScreenY")&""
		strScreenZ = Request.Form("strScreenZ")&""
		strPrintX = Request.Form("strPrintX")&""
		strPrintY = Request.Form("strPrintY")&""
		strPrintZ = Request.Form("strPrintZ")&""
	end if

End Sub

'@ PAGE TITLE
fw_ObjItem.StringName = "title"
fw_ObjItem.StringValue = "HIPOCRATE - Domenii de Analize"

	<script language="javascript">
	<!--
		function TestData()
		{
			var dataD, dataF, d;

			with (document.frmEdit)
			{
				if (isEmpty(strDomain.value))
				{
					alert("Numele grupului trebuie specificat!");
					strDomain.focus();
					return false;
				}

				if (strSection.selectedIndex == 0)
				{
					alert("Numele sectiei trebuie specificat!");
					strSection.focus();
					return false;
				}
			}
			return true;
		}

		function EditLink(chAction)
		{
			with (document.frmEdit)
			{
				if (chAction == "D" && !confirm("Sunteti sigur ca vreti sa stergeti acest domeniu?"))
					return;

				if (chAction == "S" && !TestData())
					return;

				hdnAction.value = chAction;

				submitForm();
			}
		}

		function window_onload()
		{
			document.frmEdit.strDomain.focus();
		}

	//-->
	</script>

'@ BODY TAG
fw_ObjItem.StringName = "str"
fw_ObjItem.StringValue = "onload='return window_onload()' scroll='no'"

	<input type="hidden" name="hdnAction" value="S">
	<input type="hidden" name="hdnCodeID" value="<%= intCodeID%>">

--%>
	</div> <!-- pnlDomainPopup -->
	
	<asp:Button ID="btnShowPopupM" runat="server" Style="display: none" />
	<ajaxToolKit:ModalPopupExtender ID="mdlPopupMachines" runat="server" TargetControlID="btnShowPopupM"
		PopupControlID="pnlMachinePopup" CancelControlID="MachineCancelButton" BackgroundCssClass="modalBackground"
		PopupDragHandleControlID="pnDragHandleSelectionMachine" RepositionMode="None" X="0" Y="0" />
	<div ID="pnlMachinePopup" runat="server" class="modalPopup" Style="display: none" Width="500px">
				<asp:Table runat="server" ID="tblMachineTitleBar" Style="background-color: #87cefa; border: solid 1px Gray; height:28px; width: 500px">
					<asp:TableRow>
						<asp:TableCell Width="100%" HorizontalAlign="Center">
							<asp:Panel runat="server" ID="pnDragHandleSelectionMachine" Style="cursor: move;">
								Aparat
							</asp:Panel>
						</asp:TableCell>
						<asp:TableCell>
							<asp:Image ID="MachineCancelButton" AccessKey="c" runat="server" ImageUrl="~/Images/Hipocrate/icon_post_delete.gif"
								Style="cursor: pointer" title="<%$ Resources:DatabaseStrings, Close %>" />
						</asp:TableCell>
					</asp:TableRow>
				</asp:Table>
		<asp:UpdatePanel ID="upMachineEditor" runat="server" UpdateMode="Always">
			<ContentTemplate>
				<table Style="width:500px">
					<tr>
						<td align="right">
							<asp:Label ID="lblMachineTitle" runat="server" Font-Bold="true" ForeColor="Yellow">
								Tip de aparat
							</asp:Label>
						</td>
					</tr>
				</table>
				<table style="width:500px">
					<tr valign="top">
						<td>
							<div class="menu_th">
								<asp:Label ID="lblMachineH2" runat="server" CssClass="menu_th">
									Tipul de aparat <!-- name -->
								</asp:Label>
							</div>
							<asp:Literal ID="hiddenMachineId" runat="server" Visible="false" />
							<table width="100%">
								<tr>
									<td class="tdn" style="width:20%">Numele tipului:</td>
									<td class="tdn"> <!-- size="35" -->
										<asp:TextBox ID="strMachineName" runat="server" CssClass="box" MaxLength="50" />
										&nbsp;
									</td>
									<td class="tdn" style="width:20%">Clasa rezultatelor:</td>
									<td class="tdn"> <!-- size="35" -->
										<asp:DropDownList ID="strClass" runat="server" CssClass="box" />
										&nbsp;
									</td>
								</tr>
								<tr>
									<td class="tdn" width="20%">Furnizor:</td>
									<td class="tdn"> <!-- size="35" -->
										<asp:TextBox ID="strSupplier" runat="server" CssClass="box" MaxLength="50" />
										&nbsp;
									</td>
									<td class="tdn" width="20%">WEB URL:</td>
									<td class="tdn"> <!-- size="35" -->
										<asp:TextBox ID="strURL" runat="server" CssClass="box" MaxLength="1024" />
										&nbsp;
									</td>
								</tr>
								<tr>
									<td class="tdn">Reactiv</td>
									<td class="tdn">
										<asp:TextBox ID="strReactiv" runat="server" CssClass="box" MaxLength="50" />
										&nbsp;
									</td>
									<td class="tdn">
										<label for="<% =strVisible.ClientID %>">
											Afisez pe buletin?
										</label>
									</td>
									<td class="tdn">
										<asp:CheckBox ID="strVisible" runat="server" CssClass="box" Checked="true" />
										&nbsp;
									</td>
								</tr>
							</table>
							<div class="divEnd">
							</div>
							<div style="text-align:center">
								<cc2:CustomButton ID="btnSaveMachine" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Save %>"
									OnServerClick="ProcessMachineCommand" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnDeleteMachine" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Delete %>"
									OnServerClick="ProcessMachineCommand" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnInsertMachine" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Add %>"
									OnServerClick="ResetMachineId" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnSearchMachine" runat="server" Text="<%$ Resources:DatabaseStrings, btn_Search %>"
									OnServerClick="BackToMachineList" />
							</div>
						</td>
					</tr>
				</table>
			</ContentTemplate>
		</asp:UpdatePanel>
	</div> <!-- pnlMachinePopup -->
	
	</div> <!-- positioning div -->

	<div style="Left: 20%; Right: 20%; Float: none; Position: absolute; Top: 40%; bottom: 40%; visibility: visible; background-color: Transparent">
	<asp:Button ID="btnShowConfirmationRequest" runat="server" Style="display: none" />
	<ajaxToolKit:ModalPopupExtender ID="mdlPopupConfirmationRequest" runat="server" TargetControlID="btnShowConfirmationRequest"
		PopupControlID="pnlConfirmationRequestPopup" BackgroundCssClass="modalBackground"
		PopupDragHandleControlID="pnDragHandleSelectionConfirmationRequest" RepositionMode="None" X="0" Y="0" />
	<div ID="pnlConfirmationRequestPopup" runat="server" class="modalPopup" Style="display: none" Width="500px">
				<table Style="background-color: #87cefa; border: solid 1px Gray; height:28px; width: 500px">
					<tr>
						<td style="text-align:center">
							<asp:Panel runat="server" ID="pnDragHandleSelectionConfirmationRequest" Style="cursor: move;">
								<asp:Literal ID="dummyWorkaround" runat="server" Text="<%$ Resources:GridView, MultiEdit_Confirmation%>" />
							</asp:Panel>
						</td>
						<td style="text-align:right">
							<asp:ImageButton ID="btnCloseConfirmationRequest" AccessKey="c" runat="server" ImageUrl="~/Images/Hipocrate/icon_post_delete.gif"
								Style="cursor: pointer" OnClick="ProcessGroupConfirmationAction" title="<%$ Resources:DatabaseStrings, Close %>" />
						</td>
					</tr>
				</table>
		<asp:UpdatePanel ID="upConfirmationRequest" runat="server" UpdateMode="Always">
			<ContentTemplate>
				<table style="width:500px">
					<tr valign="top">
						<td>
							<div style="text-align:center">
								<cc2:CustomButton ID="btnSaveAll" runat="server" Text="<%$ Resources:GridView, Confirmation_SaveAll %>"
									OnServerClick="ProcessGroupConfirmationAction" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnDiscardAll" runat="server" Text="<%$ Resources:GridView, Confirmation_DiscardAll %>"
									OnServerClick="ProcessGroupConfirmationAction" />
								&nbsp;&nbsp;
								<cc2:CustomButton ID="btnBackToEditing" runat="server" Text="<%$ Resources:GridView, Confirmation_Postpone %>"
									OnServerClick="ProcessGroupConfirmationAction" />
							</div>
						</td>
					</tr>
				</table>
			</ContentTemplate>
		</asp:UpdatePanel>
	</div> <!-- pnlConfirmationRequestPopup -->
	</div> <!-- positioning div -->

	<script language="javascript" type="text/javascript">
		function scrollListTo(list, div) {
			var location = Sys.UI.DomElement.getLocation($get(div));
			$get(list).scrollTop = location.y - 300;
		}

		$addHandler(document, "keydown", onKeyDown);

		function onKeyDown(e) {
			if (e && e.keyCode == Sys.UI.Key.esc) {
				$find('<%=mdlPopupDomains.ClientID %>').hide();
			}
		}

		function DoSyncCoords() {
			if ($get('syncCoords').checked || ($get('syncCoords').checked == 'checked'))
				$get('<%=strPrintY.ClientID %>').value = $get('<%=strScreenY.ClientID %>').value;
		}
		function UpdateSyncCoords() {
			var target = $get('<%=strPrintY.ClientID %>');
			if ($get('syncCoords').checked || ($get('syncCoords').checked == 'checked')) {
				target.disabled = true;
				target.enabled = false;
				target.style.backgroundColor = 'gray';
				target.value = $get('<%=strScreenY.ClientID %>').value;
			}
			else {
				target.disabled = false;
				target.enabled = true;
				target.style.backgroundColor = 'white';
			}
		}

		function contentPageLoad() {
			UpdateSyncCoords(); //run it on page load, to set up the textbox according to existing checkbox status
		}
	</script>

	<input type="hidden" id="xCoordHolder" />
	<input type="hidden" id="yCoordHolder" />
	<script id="SmartScroller_by_4GFR" language="javascript" type="text/javascript">

<!--
	// thanks to: http://www.4guysfromrolla.com/articles/111704-1.aspx
   function js4GFR_SmartScroller_GetCoords()
   {
      var scrollX, scrollY;

      if (document.all)
      {
         if (!document.documentElement.scrollLeft)
            scrollX = document.body.scrollLeft;
         else
            scrollX = document.documentElement.scrollLeft;

         if (!document.documentElement.scrollTop)
            scrollY = document.body.scrollTop;
         else
            scrollY = document.documentElement.scrollTop;
      }
      else
      {
         scrollX = window.pageXOffset;
         scrollY = window.pageYOffset;
      }

      $get('xCoordHolder').value = scrollX;
      $get('yCoordHolder').value = scrollY;
      //document.forms[formID].xCoordHolder.value = scrollX;
      //document.forms[formID].yCoordHolder.value = scrollY;
   }

   function js4GFR_SmartScroller_Scroll()
   {
      var x = $get('xCoordHolder').value;
      var y = $get('yCoordHolder').value;
      window.scrollTo(x, y);
   }

   //window.onload = js4GFR_SmartScroller_Scroll;
   //window.onscroll = js4GFR_SmartScroller_GetCoords;
   //window.onkeypress = js4GFR_SmartScroller_GetCoords;
   //window.onclick = js4GFR_SmartScroller_GetCoords;
// -->


	</script>
</asp:Content>
